﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace YJKRevitDimensionText.DoorWindowDim
{
	public partial class ProcessBarForm : System.Windows.Forms.Form
	{
		public ProcessBarForm()
		{
			this.InitializeComponent();
		}

		private void ProcessBarForm_Load(object sender, EventArgs e)
		{
		}

		protected override void DefWndProc(ref Message m)
		{
			base.DefWndProc(ref m);
		}

		public void SetText(string strInput)
		{
			this.label_Message.Text = strInput;
			this.Refresh();
		}

		public void SetProcessBarMax(int nMaxCount)
		{
			if (nMaxCount < 1)
			{
				this.progressBar_process.Maximum = 0;
			}
			else
			{
				this.progressBar_process.Maximum = nMaxCount;
			}
			this.Refresh();
		}

		public void SetProcessBarNowValue(int nNowValue)
		{
			if (nNowValue < 1)
			{
				this.progressBar_process.Value = 0;
			}
			else
			{
				this.progressBar_process.Value = nNowValue;
			}
			this.Refresh();
		}
	}
}
